////	Trainer.h
#ifndef __DMC_TRAINER_H
#define __DMC_TRAINER_H

#include <Windows.h>
#include <tchar.h>
#include <MMSystem.h>
#include <map>
#include <ctime>
#pragma comment(lib,"winmm.lib")


using namespace std;
struct Camera
{	float m_Height;
	float m_Angle;
	float m_Distant;
	float m_SDistant;
	float m_JJ;
	Camera(float height=170,float angle=0.2,float distant=550,float sDistant=520,float jj=55)
	{
		m_Height=height;
		m_Angle=angle;
		m_Distant=distant;
		m_SDistant=sDistant;
		m_JJ=jj;
	}
	static int f;//static
	void SetRand()
	{
		f=-1*f;
	//	Height=Height-f*20;
	//	Angle=Angle+(-f)*10/100;
	//	Distant=Distant+(-f)*50;
		m_JJ-=f*30;
	}
};


class Trainer
{
	int MessageBox(LPCTSTR lpctstr)
	{
		return ::MessageBox(NULL,lpctstr,L"ERROR",MB_OK);
	}
public:
	DWORD p;
	HANDLE DMC;
	//bool CameraFlag;
	//bool RGFlag;
	//HANDLE ThreadCamera;

	bool bColorActive;
	HANDLE ThreadColor;
public:
	//map<WORD,StructCamera> Nero;
	//map<WORD,StructCamera> NeroBoss;
	//map<WORD,StructCamera> Dante;
	//map<WORD,StructCamera> DanteBoss;
	Trainer();
	~Trainer()
	{
		bColorActive=0;
		if(DMC)
			CloseHandle(DMC);
	}
	int	 OpenDMC();
	/*void InitDefult();
	int LoadorWrite(int bInitLoadWrite=1);
	int Load(int);
	int Write();

	void AllMision();
	void AutoCharge();
	void AutoSword();
	void SetTurbo(BYTE);
	void DireAct();
	void HideHP();
	void KbWalk();
	void LockDevil();
	void LockHealth();
	void MissionC();
	void Pts();
	void Speed0();
	void SpeedReset();
	void StopTime();
	void SwordALL();
	void SetHard(BYTE);
	void SetBp(BYTE);
	void SetBpRush(BYTE);
	void SetMisson(BYTE);
	void WriteSpeed(float v);
	void SpeedUp(float v1,float v2,int t,int pt=40);
	void ReadCamera(StructCamera *lp);
	void WriteCamera(StructCamera *lp);
	void WriteCamera(float Height,float Angle,float Distant,float SDistant,float jj);
	void WriteCameraBoss(StructCamera *lp);
	void WriteCameraBoss(float Height,float Angle,float Distant);
	WORD ReadAction();*/

	void CreateColor();
	void PauseColor();
	virtual int MyPlaySound()=0;
	static DWORD WINAPI ColorProc(LPVOID lp);

};
#endif//
